package com.noahplat.sms;

import com.noahplat.common.utils.RedisUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * 作者：李景星
 * 描述：短信平台微服务启动类
 * 时间：2020-10-23
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@MapperScan("com.noahplat.sms.mapper")
@EnableFeignClients(basePackages = {"com.noahplat.sms.feign","com.noahplat.user.feign"})   //启动feign扫描
public class SmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(SmsApplication.class, args);
    }

    /*获取RedisUtils*/
    @Bean
    public RedisUtils getRedisUtils(){
        return new RedisUtils();
    }
}
